Utente.prototype = new DOMAware();
Utente.prototype.constructor = Utente;

function Utente(loadevent) {
    DOMAware.call(this);
    var _tutor = false;
    var _onLine = false;
    var _name = null;
    // l'utente necessita del DOM attivo in fase di inizializzazione
    var _dom=this.getDOM(loadevent);

    this.isTutor = function() {
        return this.isOnline() && SSRIQuery("img[src*='icoUser.gif']", _dom).size() == 0;
    };
    this.isOnline = function() {
        return SSRIQuery("input[type='password']", _dom).size() == 0;;
    };
    this.getName = function() {
         if (this.isTutor()) {
            return SSRIQuery("span#ctl06_NameLabel", _dom).text().replace(/\s+/g, ' ').trim();
        } else {
            return SSRIQuery("td.boxSeparator", _dom).eq(0).text().replace(/\s+/g, ' ').trim();
        }
    };
}
Utente.prototype.getAddress = function() {
    if (Constant.DEBUG) {
        return Util.BASE_ADDRESS + "SSRI - Home.html";
        //        return Util.BASE_ADDRESS + "SSRI - Home Tutor.html";
    } else {
        return Util.BASE_ADDRESS;
    }
};

